﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Industry.aspx.cs" Inherits="Industry" Title="Industry"
    MasterPageFile="~/Admin/Membership.master" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <br />
    <br />   <br />
    <br />
     <br />
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

        <script type="text/javascript">
                function rowDblClick(sender, eventArgs) {
                    sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
                }
        </script>

    </telerik:RadCodeBlock>
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" AllowPaging="true"
        OnDeleteCommand="RadGrid1_DeleteCommand" OnNeedDataSource="RadGrid1_NeedDataSource"
        OnInsertCommand="RadGrid1_InsertCommand" OnUpdateCommand="RadGrid1_UpdateCommand"
        AllowSorting="true" PageSize="20">
        <MasterTableView DataKeyNames="IndustryID,Industry" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage">
            <Columns>
                <telerik:GridTemplateColumn HeaderText="Industry" UniqueName="Industry" DataField="Industry"
                    SortExpression="Industry">
                    <ItemTemplate>
                        <asp:Label ID="lblIndustry" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,  "Industry") %>' />
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadTextBox ID="txtIndustry" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,  "Industry") %>' />
                    </EditItemTemplate>
                    <ItemStyle VerticalAlign="Top" />
                </telerik:GridTemplateColumn>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                <telerik:GridButtonColumn ConfirmText="Delete this Industry?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
            </Columns>
            <EditFormSettings>
                <EditColumn ButtonType="ImageButton" />
            </EditFormSettings>
        </MasterTableView>
        <PagerStyle Mode="NextPrevAndNumeric" />
        <ClientSettings>
            <ClientEvents OnRowDblClick="rowDblClick" />
        </ClientSettings>
    </telerik:RadGrid>
</asp:Content>
